
	u "data/panel_mafiaconsmig", clear
	
		drop if iddecade==1|iddecade==4 // 1951 | 1981

**-----------------------------------------------------

			* Appendix D
			*Instrument for construction

**-----------------------------------------------------

*Table D.1: Distribution of construction 1961–1971 in cities with and without development plan assignment
preserve 

	keep if iddecade==2
	eststo t1: estpost summ empcp if above10k==0, d 
	esttab t1 using "tables/tableD1.tex", cell((N mean(fmt(%9.3f)) sd(fmt(%9.3f)) min(fmt(%9.3f)) p10(fmt(%9.3f)) p25(fmt(%9.3f)) p50(fmt(%9.3f)) p75(fmt(%9.3f)) p90(fmt(%9.3f)) max(fmt(%9.3f)))) nonumber nomtitle replace label

	eststo t2: estpost summ empcp if above10k_sure==0, d
	esttab t2 using "tables/tableD1.tex", cell((N mean(fmt(%9.3f)) sd(fmt(%9.3f)) min(fmt(%9.3f)) p10(fmt(%9.3f)) p25(fmt(%9.3f)) p50(fmt(%9.3f)) p75(fmt(%9.3f)) p90(fmt(%9.3f)) max(fmt(%9.3f)))) nonumber nomtitle label append

	eststo t3: estpost summ empcp if above10k_sure==1, d
	esttab t3 using "tables/tableD1.tex", cell((N mean(fmt(%9.3f)) sd(fmt(%9.3f)) min(fmt(%9.3f)) p10(fmt(%9.3f)) p25(fmt(%9.3f)) p50(fmt(%9.3f)) p75(fmt(%9.3f)) p90(fmt(%9.3f)) max(fmt(%9.3f)))) nonumber nomtitle label append

restore

*Figure D.1: Construction employment per capita 1961 (blue) and cities assigned to adopt a development plan (red) 
preserve
	keep if iddecade==2
	format empcp migshare %5.3f
	gen above10=1 if above10k==1
			
	spmap empcp using "data/city-coord.dta", id(id) fcolor(Blues) ocolor(none none none none none none)  clmethod(quantile) clnumber(6) point( by(above10) xcoord(x_cc) ycoord(y_cc) fcolor(reddish) ocolor(red) osize(*.5) size(*.5)) name(con, replace) graphregion(color(white)) 

	graph export "figures/figureD1.pdf", as(pdf) replace

restore

*Table D.2: Effect of the development plan on growth in construction employment
rdrobust change20 running, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum change20 if above10k==0 & abs(running)<=`bdw'
	local mean_control=r(mean)
	outreg2 using "tables/tableD2.tex", replace tex label addstat("Conventional p-value", e(pv_cl), "Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes ctitle("Constr Emp Growth","1961, 1971")
	
rdrobust change20s running, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum change20s if above10k==0 & abs(running)<=`bdw'
	local mean_control=r(mean)
	outreg2 using "tables/tableD2.tex", tex label addstat("Conventional p-value", e(pv_cl), "Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes ctitle("Share Constr Emp","Growth, 1961, 1971")
	
rdrobust empci51 running if iddecade==2, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum empci51 if above10k==0 & abs(running)<=`bdw'
	local mean_control=r(mean)
	outreg2 using "tables/tableD2.tex", tex label addstat("Conventional p-value", e(pv_cl), "Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes ctitle("Constr Emp","1951 (before)")
	
rdrobust change20_1981 running if iddecade==2, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum change20_1981 if above10k==0 & abs(running)<=`bdw'
	local mean_control=r(mean)
	outreg2 using "tables/tableD2.tex", tex label addstat("Conventional p-value", e(pv_cl), "Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes ctitle("Constr Emp Growth","1981 (after)")
	
	
*Figure D.2: Effect of the development plan on growth in construction employment
	
	rdplot change20s running, p(1) graph_options(ytitle(Share Construction Employment Growth 1961-71, size(small)) xtitle(Population 1871) legend(off)), if pop1871<15000 & pop1871>5000 
	graph save "figures/c1.gph", replace
	
	rdplot change20 running,  p(1) graph_options(ytitle(Construction Employment Growth 1961-71, size(small)) xtitle(Population 1871) legend(off)), if pop1871<15000 & pop1871>5000 
	graph save "figures/c2.gph", replace
	
	graph combine "figures/c1.gph" "figures/c2.gph"
	graph export "figures/figureD2.pdf", as(pdf) replace
	
	erase "figures/c1.gph"
	erase "figures/c2.gph"
	

*Figure D.3: McCrary test, cutoff for the development plan adoption at 10,000
preserve
	do "code/DCdensity.ado"
	keep if iddecade==2
	keep if pop1871>5000 & pop1871<15000
	DCdensity pop1871, breakpoint(10000) generate(Xj Yj r0 fhat se_fhat)
	graph export "figures/figureD3.pdf", as(pdf) replace
	rddensity running
restore



*Figure D.4: Placebo at other cutoffs
forval i=1/9 {
	local running_placebo=10000-`i'000
	qui rdrobust change20s pop1871, c(`running_placebo') vce(cluster municipalities)
	estimates store p`i'
}

rdrobust change20s pop1871, c(10000) vce(cluster municipalities)
estimates store p_actual

forval i=1/8 {
	local running_placebo=10000+`i'000
	qui rdrobust change20s pop1871, c(`running_placebo') vce(cluster municipalities)
	estimates store px`i'
}

coefplot (p9, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			(p8, mcolor(black) msymbol(ci) ciopts(color(black))) (p7, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (p6, mcolor(black) msymbol(ci) ciopts(color(black))) (p5, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (p4, mcolor(black) msymbol(ci) ciopts(color(black))) (p3, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (p2, mcolor(black) msymbol(ci) ciopts(color(black))) (p1, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (p_actual, mcolor(red) msymbol(ci) ciopts(color(red))) ///
			 (px2, mcolor(black) msymbol(ci) ciopts(color(black))) (px3, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (px4, mcolor(black) msymbol(ci) ciopts(color(black))) (px5, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (px6, mcolor(black) msymbol(ci) ciopts(color(black))) (px7, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 (px8, mcolor(black) msymbol(ci) ciopts(color(black))) ///
			 , swapnames vertical yline(0) legend(off) xlabel(0.545 "1,000" 1.045 "10,000" 1.445 "17,000") xtitle(Population 1871, size(small)) ytitle("Share Constr Emp Growth 1961-71", size(small))
	graph export "figures/figureD4.pdf", as(pdf) replace


*Table D.3: Effect of threshold on covariates 1951 (population and education)


u "data/panel_mafiaconsmig", clear

bys municipalities: egen pop1871a=max(pop1871) // fill values of running variable for 1951
drop pop1871 running
rename pop1871a pop1871
gen running=pop1871-10000

keep if iddecade==1 // keep only 1951

drop above10k // recreate above10k filled for 1951
gen above10k=(running>0)


		qui rdrobust ce_pop running, vce(cluster municipalities)
		local obs=e(N_h_l)+e(N_h_r)
		local bdw=e(h_l)
		sum ce_pop if above10k==0 & abs(running)<=`bdw'
		local mean_control=r(mean)
		outreg2  using "tables/tableD3", tex replace label addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes 

	foreach v of varlist ce_familysize ce_popdens ce_genderdiffeduc ce_analph ce_degree ce_elderlydep ce_youngdep   {
		qui rdrobust `v' running, vce(cluster municipalities)
		local obs=e(N_h_l)+e(N_h_r)
		local bdw=e(h_l)
		sum `v' if above10k==0  & abs(running)<=`bdw'
		local mean_control=r(mean)
		outreg2 using "tables/tableD3.tex", tex label addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes 
	}

*Table D.4: Effect of threshold on covariates 1951 (employment and housing)
		qui rdrobust ce_emp1 running, vce(cluster municipalities)
		local obs=e(N_h_l)+e(N_h_r)
		local bdw=e(h_l)
		sum ce_pop if above10k==0 & abs(running)<=`bdw'
		local mean_control=r(mean)
		outreg2  using "tables/tableD4", tex replace label addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes 

	foreach v of varlist ce_emp2 ce_emp3 ce_emp4 ce_empF2 ce_propertyhouse ce_services  {
		qui rdrobust `v' running, vce(cluster municipalities)
		local obs=e(N_h_l)+e(N_h_r)
		local bdw=e(h_l)
		sum `v' if above10k==0 & abs(running)<=`bdw'
		local mean_control=r(mean)
		outreg2 using "tables/tableD4.tex", tex label addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes 
	}
	

*Table D.5: Effect of threshold on migration in 1955

	qui rdrobust Mdsouth55 running, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum Mdsouth55 if above10k==0 & abs(running)<=`bdw'
	local mean_control=r(mean)
	outreg2 using "tables/tableD5.tex", replace tex label addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes bdec(4) ctitle("N migrants ", "south 1955")
	
	gen migshare55=Mdsouth55/ce_pop
	
	qui rdrobust migshare55 running, p(1) vce(cluster municipalities)
	local obs=e(N_h_l)+e(N_h_r)
	local bdw=e(h_l)
	sum migshare55 if above10k==0 & abs(running)<=`bdw'
	local mean_control=round(r(mean),0.0001)
	outreg2 using "tables/tableD5.tex", tex label  bdec(4) addstat("Robust p-value", e(pv_rb), "Polyn. order", e(p), "Bandwidth", e(h_l), "Outcome mean", `mean_control') addtext(Observations, `obs') noobs nonotes ctitle("Share migrants ", "south 1955")
	
	